package ru.amse.jsynchro.fileSystem;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;

import ru.amse.jsynchro.kernel.IDirectoryTree;

public interface FileSystem extends Serializable {
    //?????????     singleton   ????????????????
    InputStream openInputStream(String path, long length) throws IOException;
    OutputStream openOutputStream(String path, long length) throws IOException;
    long getFileLength(String path) throws IOException;
    void closeInputStream(InputStream is) throws IOException;
    IDirectoryTree getDirectoryTree(String root) throws IOException;
    void makeDir(File dir) throws IOException;
    File[] listFiles(File dir) throws IOException;
    boolean deleteFile(File f) throws IOException;
    void closeOutputStream(OutputStream is) throws IOException;
//    public String getTreeRoot() throws IOException;
    boolean isDirectory(File file) throws IOException;
    void attrRead(File file) throws IOException;
    void attrReadOnly(File file) throws IOException;
    void attrWrite(File file) throws IOException;
    void attrExecute(File file) throws IOException;
    void attrHidden(File file) throws IOException;
}
